using UnityEngine;
using System.Collections;

public class Teleport : MonoBehaviour
{
	public Transform destination;
	
	void OnTriggerEnter (Collider other)
	{
		Transform snake = other.transform.parent;
		int numParts = snake.childCount;
		for (int i = 0; i < numParts; ++i)
		{
			snake.GetChild(i).position = destination.position;
		}
	}
}
